for track filter start and stop times in GUI.
public:
TrackFilterData(): title(false), titleString(QString()),
move(false), weeks(0), days(0), hours(0), mins(0), secs(0),
- TZ(true),
+ localTime(true), utc(false),
start(false),
stop(false),
pack(false), merge(false), split(false),
sg.addVarSetting(new DateTimeSetting("trks.startTime", startTime));
sg.addVarSetting(new BoolSetting("trks.stop", stop));
sg.addVarSetting(new DateTimeSetting("trks.stopTime", stopTime));
- sg.addVarSetting(new BoolSetting("trks.TZ", TZ));
+ sg.addVarSetting(new BoolSetting("trks.localTime", localTime));
+ sg.addVarSetting(new BoolSetting("trks.utc", utc));
sg.addVarSetting(new BoolSetting("trks.move", move));
sg.addVarSetting(new IntSetting("trks.weeks", weeks));
sg.addVarSetting(new IntSetting("trks.days", days));
QString titleString;
bool move;
int weeks, days, hours, mins, secs;
- bool TZ;
+ bool localTime, utc;
bool start;
QDateTime startTime;
connect(ui.splitTimeCheck, &QAbstractButton::clicked, this, &TrackWidget::splitTimeX);
connect(ui.splitDistanceCheck, &QAbstractButton::clicked, this, &TrackWidget::splitDistanceX);
- connect(ui.TZCheck, &QAbstractButton::clicked, this, &TrackWidget::TZX);
+ connect(ui.localTime, &QAbstractButton::clicked, this, &TrackWidget::TZX);
+ connect(ui.utc, &QAbstractButton::clicked, this, &TrackWidget::TZX);
ui.startEdit->setDisplayFormat("dd MMM yyyy hh:mm:ss AP");
ui.stopEdit->setDisplayFormat("dd MMM yyyy hh:mm:ss AP");
// If the two timeSpecs match Qt5 and Qt6 behave the same.
ui.startEdit->setTimeSpec(tfd.startTime.timeSpec());
ui.stopEdit->setTimeSpec(tfd.stopTime.timeSpec());
- // Force TZ data to be in sync with startTime & stopTime time spec.
- // This makes sure the initial state of the TZCheck box is in agreement
- // with the startTime::timeSpec and stopTime::timeSpec.
- tfd.TZ = tfd.startTime.timeSpec() == Qt::LocalTime;
+ // Make sure the initial state of the localTime and utc radio buttons
+ // is in agreement with the startTime::timeSpec and stopTime::timeSpec.
+ tfd.localTime = tfd.startTime.timeSpec() == Qt::LocalTime;
+ tfd.utc = !tfd.localTime;
// Collect the data fields.
fopts << new BoolFilterOption(tfd.title, ui.titleCheck);
fopts << new BoolFilterOption(tfd.move, ui.moveCheck);
- fopts << new BoolFilterOption(tfd.TZ, ui.TZCheck);
+ fopts << new BoolFilterOption(tfd.localTime, ui.localTime);
+ fopts << new BoolFilterOption(tfd.utc, ui.utc);
fopts << new BoolFilterOption(tfd.start, ui.startCheck);
fopts << new BoolFilterOption(tfd.stop, ui.stopCheck);
fopts << new BoolFilterOption(tfd.pack, ui.packCheck);
//------------------------------------------------------------------------
void TrackWidget::otherCheckX()
{
- ui.TZCheck->setEnabled(ui.stopCheck->isChecked() || ui.startCheck->isChecked());
+ ui.localTime->setEnabled(ui.stopCheck->isChecked() || ui.startCheck->isChecked());
+ ui.utc->setEnabled(ui.stopCheck->isChecked() || ui.startCheck->isChecked());
ui.splitTimeSpin->setEnabled(ui.splitTimeCheck->isChecked());
ui.splitTimeCombo->setEnabled(ui.splitTimeCheck->isChecked());
//------------------------------------------------------------------------
void TrackWidget::TZX()
{
- if (ui.TZCheck->isChecked()) {
+ if (ui.localTime->isChecked()) {
ui.startEdit->setTimeSpec(Qt::LocalTime);
ui.stopEdit->setTimeSpec(Qt::LocalTime);
} else {
<rect>
<x>0</x>
<y>0</y>
- <width>663</width>
+ <width>675</width>
<height>270</height>
</rect>
</property>
</property>
</widget>
</item>
- <item row="3" column="3" rowspan="2">
- <widget class="QCheckBox" name="TZCheck">
- <property name="toolTip">
- <string>If checked, time specified here is based on this computer's current time zone. </string>
- </property>
- <property name="whatsThis">
- <string>If checked, the times specified here are based on the local computer's time zone. Otherwise it is UTC.</string>
- </property>
- <property name="text">
- <string>Local Time</string>
- </property>
- </widget>
- </item>
<item row="4" column="0">
<widget class="QCheckBox" name="stopCheck">
<property name="sizePolicy">
</property>
</widget>
</item>
+ <item row="3" column="3" rowspan="2">
+ <widget class="QRadioButton" name="localTime">
+ <property name="toolTip">
+ <string>If checked, times specified here are based on this computer's current time zone.</string>
+ </property>
+ <property name="whatsThis">
+ <string>If checked, times specified here are based on this computer's current time zone.</string>
+ </property>
+ <property name="text">
+ <string>Local Time</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="3" column="4" rowspan="2">
+ <widget class="QRadioButton" name="utc">
+ <property name="toolTip">
+ <string>If checked, times specified here are UTC.</string>
+ </property>
+ <property name="whatsThis">
+ <string>If checked, times specified here are UTC.</string>
+ </property>
+ <property name="text">
+ <string>UTC</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
</layout>
</item>
<item row="0" column="1">
</widget>
<resources/>
<connections/>
+ <buttongroups>
+ <buttongroup name="buttonGroup"/>
+ </buttongroups>
</ui>